package com.seven.tools.mybatilsx;

import com.seven.tools.mybatilsx.bean.ApiResult;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.io.Serializable;
import java.util.List;


public interface IController<T> {

    ApiResult saveOrUpdate(T t);

    @PostMapping("save/more")
    ApiResult saveMore(@RequestBody List<T> t);

    ApiResult deleteById(Serializable id);

    @DeleteMapping("delete/more")
    ApiResult deleteMore(List<Serializable> idList);

    ApiResult getById(Serializable id);

    ApiResult list(Integer current,Integer size, T t);

    ApiResult search(Integer current,Integer size, T t);

}
